# ===========================================================================
#   buttonbox.py -----------------------------------------------------------
# ===========================================================================

#   import ------------------------------------------------------------------
# ---------------------------------------------------------------------------
from tkinter import *
from tkinter import ttk

#   class -------------------------------------------------------------------
# ---------------------------------------------------------------------------
class ButtonBox(Frame):

    #   method --------------------------------------------------------------
    # -----------------------------------------------------------------------
    def __init__(
            self, 
            parent, 
            bbox=list(),
            **kwargs
        ):
        super(ButtonBox, self).__init__(parent, **kwargs)

        if bbox:
            self.makeform(bbox[0], bbox[1])

    #   method --------------------------------------------------------------
    # -----------------------------------------------------------------------
    def makeform(self, labels, funcs):
        for label, func in zip(labels, funcs):
            button = ttk.Button(self, text=label, command=func)
            button.pack(side=TOP, fill=X)

        